package head.first.model.state.demo1;

/**
 * Created by yiyongyao on 2018/2/27.
 * 订单状态--已锁定
 */
public class LockedState extends OrderState {

    @Override
    void confirm(OrderContext orderContext) {
        orderContext.setState(this);

    }
    @Override
    void modify(OrderContext orderContext) {
        orderContext.setState(this);

    }
    @Override
    void pay(OrderContext orderContext) {
        orderContext.setState(new LockedState());
    }

    @Override
    void dispalyState(OrderContext orderContext) {
        System.out.println("订单当前状态为====>已锁定");
    }
}
